import importlib

#读取配置文件
def config_get(class_name,dict_name):
    namespace_name = "Config." + class_name
    module = importlib.import_module(namespace_name)
    return getattr(module, dict_name,None)

#根据命名空间实例化对象
def class_get(class_full_name):
    # 反射调用
    last_index_rfind = class_full_name.rfind('.')
    class_name_length = len(class_full_name)

    namespace_name = class_full_name[:last_index_rfind]
    class_name = class_full_name[last_index_rfind + 1:class_name_length]

    module = importlib.import_module(namespace_name)
    class_obj = getattr(module, class_name, None)  # 不存在则为None

    return class_obj

def test2(data):
    print('==========>' + data)